package demo.practice.dp;

public class P674 {

    public static void main(String[] args) {
        P674 p300= new P674();
        p300.findLengthOfLCIS(new int[]{1,3,5,4,2,3,4,5});
    }

    public int findLengthOfLCIS(int[] nums) {
        int max=0;
        int tmpMax=0;
        for(int i=0;i<nums.length;i++){
            if(i==0||nums[i]>nums[i-1]){
                tmpMax++;
            }else{
                tmpMax=1;
            }
            max=Math.max(tmpMax,max);
        }
        return max;
    }
}
